]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Fix generated GLSL dependency
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 20 Dec 2019 19:54:07 +0000 (20:54 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 20 Dec 2019 20:02:45 +0000 (21:02 +0100)
StScrollViewFade depends on st-scroll-view-fade-generated.c, but
that dependency isn't expressed to the build system; we just hope
that the custom target runs before compiling the effect.

Instead, add the generated source to the st target so the dependency
is expressed properly.

(The change from .c to .h is to prevent the file from being both
included and compiled, resulting in a duplicated symbol)

https://bugzilla.gnome.org/show_bug.cgi?id=789937

src/st/meson.build
src/st/st-scroll-view-fade.c

index 7ab203659bd733817ee707f2b1ae88dfa526432c..452c30b99fa998035d5092bd0ef978a374101917 100644 (file)
@@ -155,14 +155,15 @@ st_gir_sources = st_sources + st_headers + st_enums
 
 data_to_c = find_program(meson.source_root() + '/src/data-to-c.pl')
 
-custom_target('scroll-view-fade-glsl',
+glsl_sources = custom_target('scroll-view-fade-glsl',
   input: ['st-scroll-view-fade.glsl'],
-  output: ['st-scroll-view-fade-generated.c'],
-  build_by_default: true,
+  output: ['st-scroll-view-fade-generated.h'],
   capture: true,
   command: [data_to_c, '@INPUT@', 'st_scroll_view_fade_glsl']
 )
 
+st_nogir_sources = [glsl_sources]
+
 st_cflags = [
   '-I@0@/src'.format(meson.source_root()),
   '-I@0@'.format(meson.build_root()),
@@ -177,7 +178,7 @@ st_cflags = [
 
 # Currently meson requires a shared library for building girs
 libst = shared_library('st-1.0',
-  sources: st_gir_sources + croco_sources,
+  sources: st_gir_sources + st_nogir_sources + croco_sources,
   c_args: st_cflags,
   dependencies: [clutter_dep, gtk_dep, mutter_dep, libxml_dep, m_dep],
   build_rpath: mutter_typelibdir,
index 8d473d3adfbfe9ccacc3fb27a7b73cfd39eac302..656fa322fedfb3e85a805e9207ce4a82678a4c62 100644 (file)
@@ -32,7 +32,7 @@
 
 #define DEFAULT_FADE_OFFSET 68.0f
 
-#include "st-scroll-view-fade-generated.c"
+#include "st-scroll-view-fade-generated.h"
 
 struct _StScrollViewFade
 {